package who.tmap.ui.util.jsorttable;

import java.math.BigDecimal;

import javax.swing.JLabel;
import javax.swing.table.DefaultTableCellRenderer;

public class CellRenderer extends DefaultTableCellRenderer {

	public void setValue(Object value) {
		
        if ( value instanceof Double || value instanceof Integer 
        		|| value instanceof Float || value instanceof Long
        		|| value instanceof Short || value instanceof BigDecimal || value instanceof Byte ) { 
           setHorizontalAlignment(JLabel.RIGHT);
        } else {
        	setHorizontalAlignment(JLabel.LEFT);
        }

        super.setValue(value);
	}
}
